import { default as request, cloud } from '@/framework/utils/request'
const AIRPORT = '/unifiedAirport',
  TRAIN = '/unifiedSubway',
  XQZY = '/unifiedResource',
  YHZC = '/unifiedPolicy',
  city = '/unifiedConditions',
  park = '/unifiedPark',
  GD = '/unifiedParkVenue',
  CF = '/unifiedParkWorkshop',
  LY = '/unifiedParkPremises',
  industry = '/unifiedParkIndustry',
  GSL = '/unifiedPublicity'
export default ({
  //机场
  getAirportTimeList(data) {
    return request({
      url: `${cloud.investment}${AIRPORT}/page`,
      method: 'post',
      data
    })
  },
  addAirportTimeItem(data) {
    return request({
      url: `${cloud.investment}${AIRPORT}/add`,
      method: 'post',
      data
    })
  },
  updateAirportTimeItem(data) {
    return request({
      url: `${cloud.investment}${AIRPORT}/edit`,
      method: 'post',
      data
    })
  },
  delAirportTimeItem(data) {
    return request({
      url: `${cloud.investment}${AIRPORT}/delete`,
      method: 'post',
      data
    })
  },
  detailAirportTimeItem(data) {
    return request({
      url: `${cloud.investment}${AIRPORT}/detail`,
      method: 'post',
      data
    })
  },
  importAirportTime(data) {
    return request({
      url: `${cloud.investment}${AIRPORT}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadAirportTime() {
    return request({
      url: `${cloud.investment}${AIRPORT}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  //高铁
  getTrainTimeList(data) {
    return request({
      url: `${cloud.investment}${TRAIN}/page`,
      method: 'post',
      data
    })
  },
  addTrainTimeItem(data) {
    return request({
      url: `${cloud.investment}${TRAIN}/add`,
      method: 'post',
      data
    })
  },
  updateTrainTimeItem(data) {
    return request({
      url: `${cloud.investment}${TRAIN}/edit`,
      method: 'post',
      data
    })
  },
  delTrainTimeItem(data) {
    return request({
      url: `${cloud.investment}${TRAIN}/delete`,
      method: 'post',
      data
    })
  },
  detailTrainTimeItem(data) {
    return request({
      url: `${cloud.investment}${TRAIN}/detail`,
      method: 'post',
      data
    })
  },
  importTrainTime(data) {
    return request({
      url: `${cloud.investment}${TRAIN}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadTrainTime() {
    return request({
      url: `${cloud.investment}${TRAIN}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  //辖区资源
  getXQZYList(data) {
    return request({
      url: `${cloud.investment}${XQZY}/page`,
      method: 'post',
      data
    })
  },
  addXQZYItem(data) {
    return request({
      url: `${cloud.investment}${XQZY}/add`,
      method: 'post',
      data
    })
  },
  updateXQZYItem(data) {
    return request({
      url: `${cloud.investment}${XQZY}/edit`,
      method: 'post',
      data
    })
  },
  delXQZYItem(data) {
    return request({
      url: `${cloud.investment}${XQZY}/delete`,
      method: 'post',
      data
    })
  },
  detailXQZYItem(data) {
    return request({
      url: `${cloud.investment}${XQZY}/detail`,
      method: 'post',
      data
    })
  },
  importXQZY(data) {
    return request({
      url: `${cloud.investment}${XQZY}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadXQZY() {
    return request({
      url: `${cloud.investment}${XQZY}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  //招商政策
  getPreferentialPolicyList(data) {
    return request({
      url: `${cloud.investment}${YHZC}/page`,
      method: 'post',
      data
    })
  },
  addPreferentialPolicyItem(data) {
    return request({
      url: `${cloud.investment}${YHZC}/add`,
      method: 'post',
      data
    })
  },
  updatePreferentialPolicyItem(data) {
    return request({
      url: `${cloud.investment}${YHZC}/edit`,
      method: 'post',
      data
    })
  },
  delPreferentialPolicyItem(data) {
    return request({
      url: `${cloud.investment}${YHZC}/delete`,
      method: 'post',
      data
    })
  },
  detailPreferentialPolicyItem(data) {
    return request({
      url: `${cloud.investment}${YHZC}/detail`,
      method: 'post',
      data
    })
  },
  importPreferentialPolicy(data) {
    return request({
      url: `${cloud.investment}${YHZC}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadPreferentialPolicy(data) {
    return request({
      url: `${cloud.investment}${YHZC}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  updateStatusPreferentialPolicy(data){
    return request({
      url: `${cloud.investment}${YHZC}/updateStatus`,
      method: 'post',
      data
    })
  },
  //公示栏
  getGSLList(data) {
    return request({
      url: `${cloud.investment}${GSL}/page`,
      method: 'post',
      data
    })
  },
  addGSLItem(data) {
    return request({
      url: `${cloud.investment}${GSL}/add`,
      method: 'post',
      data
    })
  },
  updateGSLItem(data) {
    return request({
      url: `${cloud.investment}${GSL}/edit`,
      method: 'post',
      data
    })
  },
  delGSLItem(data) {
    return request({
      url: `${cloud.investment}${GSL}/delete`,
      method: 'post',
      data
    })
  },
  detailGSLItem(data) {
    return request({
      url: `${cloud.investment}${GSL}/detail`,
      method: 'post',
      data
    })
  },
  importGSL(data) {
    return request({
      url: `${cloud.investment}${GSL}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadGSL(data) {
    return request({
      url: `${cloud.investment}${GSL}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  //丛台市情
  getCitySituationInfo(){
    return request({
      url: `${cloud.investment}${city}/getOne`,
      method: 'get'
    })
  },
  setCitySituationInfo(data){
    return request({
      url: `${cloud.investment}${city}/edit`,
      method: 'post',
      data
    })
  },
  // 地理资源管理
  getParkList() {
    return request({
      url: `${cloud.investment}${park}/getlist`,
      method: 'get'
    })
  },
  getParkInfoList(data) {
    return request({
      url: `${cloud.investment}${park}/page`,
      method: 'post',
      data
    })
  },
  addParkInfoItem(data) {
    return request({
      url: `${cloud.investment}${park}/add`,
      method: 'post',
      data
    })
  },
  updateParkInfoItem(data) {
    return request({
      url: `${cloud.investment}${park}/edit`,
      method: 'post',
      data
    })
  },
  delParkInfoItem(data) {
    return request({
      url: `${cloud.investment}${park}/delete`,
      method: 'post',
      data
    })
  },
  detailParkInfoItem(data) {
    return request({
      url: `${cloud.investment}${park}/detail`,
      method: 'post',
      data
    })
  },
  importParkInfo(data) {
    return request({
      url: `${cloud.investment}${park}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadParkInfo(data) {
    return request({
      url: `${cloud.investment}${park}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  updateStatusParkInfo(data){
    return request({
      url: `${cloud.investment}${park}/updateStatus`,
      method: 'post',
      data
    })
  },
  // 供地
  getGDList(data) {
    return request({
      url: `${cloud.investment}${GD}/page`,
      method: 'post',
      data
    })
  },
  addGDItem(data) {
    return request({
      url: `${cloud.investment}${GD}/add`,
      method: 'post',
      data
    })
  },
  updateGDItem(data) {
    return request({
      url: `${cloud.investment}${GD}/edit`,
      method: 'post',
      data
    })
  },
  delGDItem(data) {
    return request({
      url: `${cloud.investment}${GD}/delete`,
      method: 'post',
      data
    })
  },
  detailGDItem(data) {
    return request({
      url: `${cloud.investment}${GD}/detail`,
      method: 'post',
      data
    })
  },
  importGD(data) {
    return request({
      url: `${cloud.investment}${GD}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadGD(data) {
    return request({
      url: `${cloud.investment}${GD}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  updateStatusGD(data){
    return request({
      url: `${cloud.investment}${GD}/updateStatus`,
      method: 'post',
      data
    })
  },
  // 厂房
  getCFList(data) {
    return request({
      url: `${cloud.investment}${CF}/page`,
      method: 'post',
      data
    })
  },
  addCFItem(data) {
    return request({
      url: `${cloud.investment}${CF}/add`,
      method: 'post',
      data
    })
  },
  updateCFItem(data) {
    return request({
      url: `${cloud.investment}${CF}/edit`,
      method: 'post',
      data
    })
  },
  delCFItem(data) {
    return request({
      url: `${cloud.investment}${CF}/delete`,
      method: 'post',
      data
    })
  },
  detailCFItem(data) {
    return request({
      url: `${cloud.investment}${CF}/detail`,
      method: 'post',
      data
    })
  },
  importCF(data) {
    return request({
      url: `${cloud.investment}${CF}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadCF(data) {
    return request({
      url: `${cloud.investment}${CF}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  updateStatusCF(data){
    return request({
      url: `${cloud.investment}${CF}/updateStatus`,
      method: 'post',
      data
    })
  },
  // 楼宇
  getLYList(data) {
    return request({
      url: `${cloud.investment}${LY}/page`,
      method: 'post',
      data
    })
  },
  addLYItem(data) {
    return request({
      url: `${cloud.investment}${LY}/add`,
      method: 'post',
      data
    })
  },
  updateLYItem(data) {
    return request({
      url: `${cloud.investment}${LY}/edit`,
      method: 'post',
      data
    })
  },
  delLYItem(data) {
    return request({
      url: `${cloud.investment}${LY}/delete`,
      method: 'post',
      data
    })
  },
  detailLYItem(data) {
    return request({
      url: `${cloud.investment}${LY}/detail`,
      method: 'post',
      data
    })
  },
  getLYEditHistoryList(data) {
    return request({
      url: `${cloud.investment}${LY}/log/page`,
      method: 'post',
      data
    })
  },
  importLY(data) {
    return request({
      url: `${cloud.investment}${LY}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadLY(data) {
    return request({
      url: `${cloud.investment}${LY}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  updateStatusLY(data){
    return request({
      url: `${cloud.investment}${LY}/updateStatus`,
      method: 'post',
      data
    })
  },
  // 产业资源管理
  getIndustryList(data) {
    return request({
      url: `${cloud.investment}${industry}/page`,
      method: 'post',
      data
    })
  },
  addIndustryItem(data) {
    return request({
      url: `${cloud.investment}${industry}/add`,
      method: 'post',
      data
    })
  },
  updateIndustryItem(data) {
    return request({
      url: `${cloud.investment}${industry}/edit`,
      method: 'post',
      data
    })
  },
  delIndustryItem(data) {
    return request({
      url: `${cloud.investment}${industry}/delete`,
      method: 'post',
      data
    })
  },
  detailIndustryItem(data) {
    return request({
      url: `${cloud.investment}${industry}/detail`,
      method: 'post',
      data
    })
  },
  importIndustry(data) {
    return request({
      url: `${cloud.investment}${industry}/import`,
      method: 'post',
      data,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  },
  downloadIndustry(data) {
    return request({
      url: `${cloud.investment}${industry}/stencil`,
      method: 'post',
      responseType: 'arraybuffer'
    })
  },
  updateStatusIndustry(data){
    return request({
      url: `${cloud.investment}${industry}/updateStatus`,
      method: 'post',
      data
    })
  },
})
